package club.banyuan.inter.Vehicles;

/**
 * @author edz
 * @version 1.0
 * @date 2020/11/25 上午11:04
 */
public class Main {
    public static void main(String[] args) {
        Pub pub = new Pub();
        Ve ve = new Ve();

        pub.setName("小明");
        System.out.println(pub.getName()+pub.buyTicket()+ve.bus()+pub.goHome());

        pub.setName("小王");
        System.out.println(pub.getName()+pub.buyTicket()+ve.car()+pub.goHome());

        pub.setName("小李");
        System.out.println(pub.getName()+pub.buyTicket()+ve.plane()+pub.goHome());


    }
}
class Ve implements Vehicles{
    @Override
    public String bus() {
        return "坐公交";
    }

    @Override
    public String car() {
        return "坐小汽车";
    }

    @Override
    public String plane() {
        return "坐飞机";
    }
}
